import { pickedLineData, Types } from '@amcax/base';
import { MultiPickResult } from '../../../../../common/components/pick-input/types';
import { docMgr } from '../../../../../module';

export const profileUiOptions = {
  pickFilter: (v: MultiPickResult) => {
    const isCurve = (v as pickedLineData).edgeId != null;
    const isSketch =
      docMgr.getDocumentObjectById(v.idInfo.o)?.type === Types.Sketcher;

    return !(isCurve && !isSketch);
  },
  allowInfinitePlane: false,
  allowInfiniteLine: false,
};
